//////////////////////////////////////////////////////////////////////////
public:
	/// <summary>
	/// cvRound
	/// </summary>
	/// <param name="value"></param>
	/// <returns></returns>
	static int Round(double value)
	{
		return cvRound(value);
	}

	/// <summary>
	/// cvFloor
	/// </summary>
	/// <param name="value"></param>
	/// <returns></returns>
	static int Floor(double value)
	{
		return cvFloor(value);
	}

	/// <summary>
	/// cvCeil
	/// </summary>
	/// <param name="value"></param>
	/// <returns></returns>
	static int Ceil(double value)
	{
		return cvCeil(value);
	}

	/// <summary>
	/// cvIsNaN
	/// </summary>
	/// <param name="value"></param>
	/// <returns></returns>
	static bool IsNaN(double value)
	{
		return cvIsNaN(value) != 0;
	}

	/// <summary>
	/// cvIsInf
	/// </summary>
	/// <param name="value"></param>
	/// <returns></returns>
	static bool IsInf(double value)
	{
		return cvIsInf(value) != 0;
	}

	/// <summary>
	/// </summary>
	/// <param name="seed"></param>
	/// <returns></returns>
	static Rng RNG(int64 seed)
	{
		Rng rng;
		rng.Val = CvRNG(seed);
		return rng;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static Rng RNG()
	{
		return RNG(-1);
	}

	/// <summary>
	/// Return random 32-bit uint integer:
	/// </summary>
	/// <param name="rng"></param>
	/// <returns></returns>
	static unsigned int RandInt(Rng% rng)
	{
		pin_ptr<uint64> prng = &rng.Val;
		return cvRandInt(prng);
	}

	/// <summary>
	/// Returns random floating-point number between 0 and 1:
	/// </summary>
	/// <param name="rng"></param>
	/// <returns></returns>
	static double RandReal(Rng% rng)
	{
		pin_ptr<uint64> prng = &rng.Val;
		return cvRandReal(prng);
	}

	/// <summary>
	/// Inline constructor. No data is allocated internally!!!
	/// (Use together with CreateData, or use CreateMat instead to
	/// get a matrix with allocated data):
	/// </summary>
	/// <param name="rows"></param>
	/// <param name="cols"></param>
	/// <param name="type"></param>
	/// <param name="data"></param>
	/// <returns></returns>
	static NAMESPACE::Mat Mat(int rows, int cols, MatFlag type, IntPtr data)
	{
		return *(NAMESPACE::Mat*)&cvMat(rows, cols, (int)type, data.ToPointer());
	}

	/// <summary>
	/// Inline constructor. No data is allocated internally!!!
	/// (Use together with CreateData, or use CreateMat instead to
	/// get a matrix with allocated data):
	/// </summary>
	/// <param name="rows"></param>
	/// <param name="cols"></param>
	/// <param name="type"></param>
	/// <returns></returns>
	static NAMESPACE::Mat Mat(int rows, int cols, MatFlag type)
	{
		return *(NAMESPACE::Mat*)&cvMat(rows, cols, (int)type);
	}

	/// <summary>
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	static double MatGet(IntPtr mat, int row, int col)
	{
		return cvmGet((CvMat*)mat.ToPointer(), row, col);
	}

	/// <summary>
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <param name="value"></param>
	static void MatSet(IntPtr mat, int row, int col, double value)
	{
		cvmSet((CvMat*)mat.ToPointer(), row, col, value);
	}

	/// <summary>
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	static PixelDepth IplDepth(MatFlag type)
	{
		return (PixelDepth)cvIplDepth((int)type);
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <param name="width"></param>
	/// <param name="height"></param>
	/// <returns></returns>
	static NAMESPACE::Rect Rect(int x, int y, int width, int height)
	{
		return NAMESPACE::Rect(x, y, width, height);
	}

	/// <summary>
	/// </summary>
	/// <param name="rect"></param>
	/// <param name="coi"></param>
	/// <returns></returns>
	static ImageROI RectToROI(NAMESPACE::Rect rect, int coi)
	{
		ImageROI roi;
		roi.XOffset = rect.X;
		roi.YOffset = rect.Y;
		roi.Width = rect.Width;
		roi.Height = rect.Height;
		roi.COI = coi;

		return roi;
	}

	/// <summary>
	/// </summary>
	/// <param name="roi"></param>
	/// <returns></returns>
	static NAMESPACE::Rect ROIToRect(ImageROI roi)
	{
		return Rect(roi.XOffset, roi.YOffset, roi.Width, roi.Height);
	}

	/// <summary>
	/// </summary>
	/// <param name="type"></param>
	/// <param name="max_iter"></param>
	/// <param name="epsilon"></param>
	/// <returns></returns>
	static NAMESPACE::TermCriteria TermCriteria(TermCriteriaType type, int max_iter, double epsilon)
	{
		return NAMESPACE::TermCriteria(type, max_iter, epsilon);
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <returns></returns>
	static NAMESPACE::Point2D32s Point(int x, int y)
	{
		return NAMESPACE::Point2D32s(x, y);
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <returns></returns>
	static NAMESPACE::Point2D32f Point2D32f(double x, double y)
	{
		return NAMESPACE::Point2D32f((float)x, (float)y);
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <returns></returns>
	static NAMESPACE::Point2D32f PointTo32f(NAMESPACE::Point2D32s point)
	{
		return NAMESPACE::Point2D32f((float)point.X, (float)point.Y);
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <returns></returns>
	static NAMESPACE::Point2D32s PointFrom32f(NAMESPACE::Point2D32f point)
	{
		NAMESPACE::Point2D32s ipt;
		ipt.X = Round(point.X);
		ipt.Y = Round(point.Y);

		return ipt;
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <param name="z"></param>
	/// <returns></returns>
	static NAMESPACE::Point3D32f Point3D32f(double x, double y, double z)
	{
		NAMESPACE::Point3D32f p;

		p.X = (float)x;
		p.Y = (float)y;
		p.Z = (float)z;

		return p;
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <returns></returns>
	static NAMESPACE::Point2D64f Point2D64f(double x, double y)
	{
		return NAMESPACE::Point2D64f(x, y);
	}

	/// <summary>
	/// </summary>
	/// <param name="x"></param>
	/// <param name="y"></param>
	/// <param name="z"></param>
	/// <returns></returns>
	static NAMESPACE::Point3D64f Point3D64f(double x, double y, double z)
	{
		return NAMESPACE::Point3D64f(x, y, z);
	}

	/// <summary>
	/// </summary>
	/// <param name="width"></param>
	/// <param name="height"></param>
	/// <returns></returns>
	static NAMESPACE::Size2D32s Size(int width, int height)
	{
		return NAMESPACE::Size2D32s(width, height);
	}

	/// <summary>
	/// </summary>
	/// <param name="width"></param>
	/// <param name="height"></param>
	/// <returns></returns>
	static NAMESPACE::Size2D32f Size2D32f(double width, double height)
	{
		return NAMESPACE::Size2D32f((float)width, (float)height);
	}

	/// <summary>
	/// </summary>
	/// <param name="start"></param>
	/// <param name="end"></param>
	/// <returns></returns>
	static NAMESPACE::Slice Slice(int start, int end)
	{
		return NAMESPACE::Slice(start, end);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0"></param>
	/// <param name="val1"></param>
	/// <param name="val2"></param>
	/// <param name="val3"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar Scalar(double val0, double val1, double val2, double val3)
	{
		return NAMESPACE::Scalar(val0, val1, val2, val3);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0"></param>
	/// <param name="val1"></param>
	/// <param name="val2"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar Scalar(double val0, double val1, double val2)
	{
		return NAMESPACE::Scalar(val0, val1, val2, 0);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0"></param>
	/// <param name="val1"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar Scalar(double val0, double val1)
	{
		return NAMESPACE::Scalar(val0, val1, 0, 0);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar Scalar(double val0)
	{
		return NAMESPACE::Scalar(val0, 0, 0, 0);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar RealScalar(double val0)
	{
		return NAMESPACE::Scalar(val0, 0, 0, 0);
	}

	/// <summary>
	/// </summary>
	/// <param name="val0123"></param>
	/// <returns></returns>
	static NAMESPACE::Scalar ScalarAll(double val0123)
	{
		return NAMESPACE::Scalar(val0123, val0123, val0123, val0123);
	}

	/// <summary>
	/// </summary>
	/// <param name="attr"></param>
	/// <param name="next"></param>
	/// <returns></returns>
	static NAMESPACE::AttrList AttrList(IntPtr attr, IntPtr next)
	{
		NAMESPACE::AttrList l;
		l.attr = attr;
		l.next = next;

		return l;
	}

	/// <summary>
	/// </summary>
	/// <param name="attr"></param>
	/// <returns></returns>
	static NAMESPACE::AttrList AttrList(IntPtr attr)
	{
		NAMESPACE::AttrList l;
		l.attr = attr;
		l.next = IntPtr::Zero;

		return l;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static NAMESPACE::AttrList AttrList()
	{
		NAMESPACE::AttrList l;
		l.attr = IntPtr::Zero;
		l.next = IntPtr::Zero;

		return l;
	}
//////////////////////////////////////////////////////////////////////////